{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "22ae7e12",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pyecharts.charts import Radar\n",
    "import pyecharts.options as opts"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "cd93f0f6",
   "metadata": {},
   "outputs": [],
   "source": [
    "v1 = [[4300, 10000, 28000, 35000, 50000, 19000]]\n",
    "v2 = [[5000, 14000, 28000, 31000, 42000, 21000]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "2b66eb07",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "<script>\n",
       "    require.config({\n",
       "        paths: {\n",
       "            'echarts':'https://assets.pyecharts.org/assets/echarts.min'\n",
       "        }\n",
       "    });\n",
       "</script>\n",
       "\n",
       "        <div id=\"ba267e3262d74808a2da8cf71bf94077\" style=\"width:900px; height:500px;\"></div>\n",
       "\n",
       "<script>\n",
       "        require(['echarts'], function(echarts) {\n",
       "                var chart_ba267e3262d74808a2da8cf71bf94077 = echarts.init(\n",
       "                    document.getElementById('ba267e3262d74808a2da8cf71bf94077'), 'white', {renderer: 'canvas'});\n",
       "                var option_ba267e3262d74808a2da8cf71bf94077 = {\n",
       "    \"animation\": true,\n",
       "    \"animationThreshold\": 2000,\n",
       "    \"animationDuration\": 1000,\n",
       "    \"animationEasing\": \"cubicOut\",\n",
       "    \"animationDelay\": 0,\n",
       "    \"animationDurationUpdate\": 300,\n",
       "    \"animationEasingUpdate\": \"cubicOut\",\n",
       "    \"animationDelayUpdate\": 0,\n",
       "    \"color\": [\n",
       "        \"#c23531\",\n",
       "        \"#2f4554\",\n",
       "        \"#61a0a8\",\n",
       "        \"#d48265\",\n",
       "        \"#749f83\",\n",
       "        \"#ca8622\",\n",
       "        \"#bda29a\",\n",
       "        \"#6e7074\",\n",
       "        \"#546570\",\n",
       "        \"#c4ccd3\",\n",
       "        \"#f05b72\",\n",
       "        \"#ef5b9c\",\n",
       "        \"#f47920\",\n",
       "        \"#905a3d\",\n",
       "        \"#fab27b\",\n",
       "        \"#2a5caa\",\n",
       "        \"#444693\",\n",
       "        \"#726930\",\n",
       "        \"#b2d235\",\n",
       "        \"#6d8346\",\n",
       "        \"#ac6767\",\n",
       "        \"#1d953f\",\n",
       "        \"#6950a1\",\n",
       "        \"#918597\"\n",
       "    ],\n",
       "    \"series\": [\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u6570\\u636e1\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    4300,\n",
       "                    10000,\n",
       "                    28000,\n",
       "                    35000,\n",
       "                    50000,\n",
       "                    19000\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {\n",
       "                    \"color\": \"blue\"\n",
       "                }\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        },\n",
       "        {\n",
       "            \"type\": \"radar\",\n",
       "            \"name\": \"\\u6570\\u636e2\",\n",
       "            \"data\": [\n",
       "                [\n",
       "                    5000,\n",
       "                    14000,\n",
       "                    28000,\n",
       "                    31000,\n",
       "                    42000,\n",
       "                    21000\n",
       "                ]\n",
       "            ],\n",
       "            \"label\": {\n",
       "                \"show\": false,\n",
       "                \"position\": \"top\",\n",
       "                \"margin\": 8\n",
       "            },\n",
       "            \"itemStyle\": {\n",
       "                \"normal\": {}\n",
       "            },\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            },\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            },\n",
       "            \"rippleEffect\": {\n",
       "                \"show\": true,\n",
       "                \"brushType\": \"stroke\",\n",
       "                \"scale\": 2.5,\n",
       "                \"period\": 4\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"legend\": [\n",
       "        {\n",
       "            \"data\": [\n",
       "                \"\\u6570\\u636e1\",\n",
       "                \"\\u6570\\u636e2\"\n",
       "            ],\n",
       "            \"selected\": {\n",
       "                \"\\u6570\\u636e1\": true,\n",
       "                \"\\u6570\\u636e2\": true\n",
       "            }\n",
       "        }\n",
       "    ],\n",
       "    \"tooltip\": {\n",
       "        \"show\": true,\n",
       "        \"trigger\": \"item\",\n",
       "        \"triggerOn\": \"mousemove|click\",\n",
       "        \"axisPointer\": {\n",
       "            \"type\": \"line\"\n",
       "        },\n",
       "        \"showContent\": true,\n",
       "        \"alwaysShowContent\": false,\n",
       "        \"showDelay\": 0,\n",
       "        \"hideDelay\": 100,\n",
       "        \"textStyle\": {\n",
       "            \"fontSize\": 14\n",
       "        },\n",
       "        \"borderWidth\": 0,\n",
       "        \"padding\": 5\n",
       "    },\n",
       "    \"radar\": {\n",
       "        \"indicator\": [\n",
       "            {\n",
       "                \"name\": \"\\u9879\\u76ee1\",\n",
       "                \"max\": 6000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u9879\\u76ee2\",\n",
       "                \"max\": 16000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u9879\\u76ee3\",\n",
       "                \"max\": 30000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u9879\\u76ee4\",\n",
       "                \"max\": 38000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u9879\\u76ee5\",\n",
       "                \"max\": 60000\n",
       "            },\n",
       "            {\n",
       "                \"name\": \"\\u9879\\u76ee6\",\n",
       "                \"max\": 22000\n",
       "            }\n",
       "        ],\n",
       "        \"name\": {\n",
       "            \"textStyle\": {}\n",
       "        },\n",
       "        \"splitLine\": {\n",
       "            \"show\": true,\n",
       "            \"lineStyle\": {\n",
       "                \"show\": true,\n",
       "                \"width\": 1,\n",
       "                \"opacity\": 1,\n",
       "                \"curveness\": 0,\n",
       "                \"type\": \"solid\"\n",
       "            }\n",
       "        },\n",
       "        \"splitArea\": {\n",
       "            \"show\": true,\n",
       "            \"areaStyle\": {\n",
       "                \"opacity\": 0\n",
       "            }\n",
       "        },\n",
       "        \"axisLine\": {\n",
       "            \"show\": true,\n",
       "            \"onZero\": true,\n",
       "            \"onZeroAxisIndex\": 0\n",
       "        }\n",
       "    }\n",
       "};\n",
       "                chart_ba267e3262d74808a2da8cf71bf94077.setOption(option_ba267e3262d74808a2da8cf71bf94077);\n",
       "        });\n",
       "    </script>\n"
      ],
      "text/plain": [
       "<pyecharts.render.display.HTML at 0x27b38b39cd0>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = (\n",
    "    Radar()\n",
    "    .add_schema(\n",
    "        schema=[\n",
    "            opts.RadarIndicatorItem(name='项目1', max_=6000),\n",
    "            opts.RadarIndicatorItem(name='项目2', max_=16000),\n",
    "            opts.RadarIndicatorItem(name='项目3', max_=30000),\n",
    "            opts.RadarIndicatorItem(name='项目4', max_=38000),\n",
    "            opts.RadarIndicatorItem(name='项目5', max_=60000),\n",
    "            opts.RadarIndicatorItem(name='项目6', max_=22000)\n",
    "        ]\n",
    "    )\n",
    "    .add('数据1', v1, color='blue')\n",
    "    .add('数据2', v2)\n",
    "    \n",
    "    .set_series_opts(label_opts=opts.LabelOpts(is_show=False))\n",
    ")\n",
    "\n",
    "c.render_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "11eb194a",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
